<template>
  <div id="box">

    <van-card
        v-for="(item) in productlist"
        :num="Number(item.stock_record[0].num_in_stock)"
        :price="item.stock_record[0].price[0].price"
        :desc="item.description"
        :title="item.title"
        :thumb="item.images[0].file"
        :key="item.product_id"
        @click="godetil(item.product_id)"
    />

  </div>
</template>

<script>
export default {
  name: "productCard",
  props:["productlist"],
  data(){
    return {
      title:"dd"
    }
  },
  methods:{
    godetil(product_id){
      this.$router.push({path:"/detail",query:{"product_id":product_id}})
    }
  }

}

</script>

<style scoped lang="less">
#box{
  padding-bottom: 60px;
}
</style>